import datetime
import requests


def get_amount(self):
    t.get_token()
    t.get_auth_token("17620533205", "123456", "0")
    date = datetime.datetime.now().strftime("%Y-%m-%d")
    url4 = 'https://open.dairphone.cn/jfdevice/getorderlist?ver=1.0&from=hardware'
    data4 = {
        "sn": "SMIT3B2019816000090",
        "token": self.token,
        "date": date,
        "page": 1,
        "auth_token": self.auth_token,
        "version": "3.4.0"
    }
    result4 = requests.post(url4, data=data4, headers=self.headers)
    results4 = result4.json()
    self.order_id = results4['data']['list'][0]['id']
    self.amount = results4['data']['list'][0]['pay_price']
    # print(self.order_id)
    # print(self.amount)
